package org.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.entity.dto.Forum;
import org.example.entity.vo.response.ForumVO;
import org.example.mapper.ForumMapper;
import org.example.service.ForumService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ForumServiceImpl extends ServiceImpl<ForumMapper, Forum> implements ForumService {
    public List<ForumVO> getForum() {
        return query().list().stream().map(i -> i.asViewObject(ForumVO.class)).toList();
    }

}
